import Router from 'vue-router'
import Vue from 'vue'

Vue.use(Router)

export default new Router({
    // mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
            path: '/login',
            name: 'Login',
            component: () =>
                import ('@/views/Login.vue')
        },
        {
            path: '/index',
            name: 'index',
            redirect: "/",
        },
        {
            path: '/',
            name: 'Layout',
            component: () =>
                import ('@/views/layout/Layout.vue'),
            children: [{
                path: "/",
                name: "Home",
                component: () =>
                    import ('@/views/layout/Home.vue'),
                meta: {
                    linkname: [{ "首页": "/" }]
                },
                children: [{
                        path: "/",
                        name: "index",
                        component: () =>
                            import ('@/views/Index.vue'),
                        meta: {
                            linkname: [{ "首页": "/" }]
                        }
                    },
                    {
                        path: "/order_list",
                        name: "order_list",
                        component: () =>
                            import ('../views/pages/Order/order_list.vue'),
                        meta: {
                            linkname: [{ "订单列表": "/order_list" }]
                        }
                    },
                    {
                        path: "/recharge_record",
                        name: "recharge_record",
                        component: () =>
                            import ('../views/pages/Order/recharge_record.vue'),
                        meta: {
                            linkname: [{ "充值记录": "/recharge_record" }]
                        }
                    },
                    {
                        path: "/details_Merchant_transaction",
                        name: "details_Merchant_transaction",
                        component: () =>
                            import ('../views/pages/Settlement/details_Merchant_transaction.vue'),
                        meta: {
                            linkname: [{ "商户交易明细": "/details_Merchant_transaction" }]
                        }
                    },
                    {
                        path: "/recharge_statistics",
                        name: "recharge_statistics",
                        component: () =>
                            import ('../views/pages/Statistics/recharge_statistics.vue'),
                        meta: {
                            linkname: [{ "充值统计": "/recharge_statistics" }]
                        }
                    },
                    {
                        path: "/consumption_statistic",
                        name: "consumption_statistic",
                        component: () =>
                            import ('../views/pages/Statistics/consumption_statistic.vue'),
                        meta: {
                            linkname: [{ "消费统计": "/consumption_statistic" }]
                        }
                    },
                    {
                        path: "/business_listings",
                        name: "business_listings",
                        component: () =>
                            import ('../views/pages/business/business_listings.vue'),
                        meta: {
                            linkname: [{ "商户列表统计": "/business_listings" }]
                        }
                    },
                    {
                        path: "/statement_list",
                        name: "statement_list",
                        component: () =>
                            import ('../views/pages/Settlement/statement_list.vue'),
                        meta: {
                            linkname: [{ "结算单列表": "/statement_list" }]
                        }
                    },
                    {
                        path: "/detail_statement_settlement",
                        name: "detail_statement_settlement",
                        component: () =>
                            import ('../views/pages/Settlement/detail_statement_settlement.vue'),
                        meta: {
                            linkname: [{ "结算单详情": "/detail_statement_settlement" }]
                        }
                    },
                    {
                        path: "/preview_of_statement",
                        name: "preview_of_statement",
                        component: () =>
                            import ('../views/pages/Settlement/preview_of_statement.vue'),
                        meta: {
                            linkname: [{ "结算单预览": "/preview_of_statement" }]
                        }
                    },
                    {
                        path: "/user_list",
                        name: "user_list",
                        component: () =>
                            import ('../views/pages/user/user_list.vue'),
                        meta: {
                            linkname: [{ "用户列表": "/user_list" }]
                        }
                    },
                    {
                        path: "/statement_details_list",
                        name: "statement_details_list",
                        component: () =>
                            import ('../views/pages/Settlement/statement_details_list.vue'),
                        meta: {
                            linkname: [{ "结算单详情列表": "/statement_details_list" }]
                        }
                    },
                    {
                        path: "/employee_list",
                        name: "employee_list",
                        component: () =>
                            import ('../views/pages/employee/employee_list.vue'),
                        meta: {
                            linkname: [{ "员工列表": "/employee_list" }]
                        }
                    },
                    {
                        path: "/log_list",
                        name: "log_list",
                        component: () =>
                            import ('../views/pages/log/log_list'),
                        meta: {
                            linkname: [{ "日志列表": "/log_list" }]
                        }
                    },
                ]
            }]
        }
    ]
});